#include "headers/connectdb.h"
#include "headers/workerplace.h"
#include <QtGui/QApplication>
#include <QtGui/QStyleFactory>
#include <QTextCodec>


int main(int argc, char *argv[])
{
    Q_INIT_RESOURCE(icons);
    QApplication a(argc, argv);
    QTextCodec *codec = QTextCodec::codecForName("utf8");
    QTextCodec::setCodecForTr(codec);
    QTextCodec::setCodecForCStrings(codec);
    QTextCodec::setCodecForLocale(codec);

    connectDB cdb;
    cdb.setWindowFlags(Qt::WindowTitleHint | Qt::CustomizeWindowHint);
    if(cdb.exec()){
        workerPlace w;
        w.showMaximized();
        return a.exec();
    }else
        return 0;
}
